package com.ruoyi.system.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.annotation.DataSource;
import com.ruoyi.common.enums.DataSourceType;
import com.ruoyi.system.domain.OtherRobotAdmin;
import com.ruoyi.system.domain.OtherRobotInfo;
import com.ruoyi.system.mapper.OtherRobotAdminMapper;
import com.ruoyi.system.mapper.OtherRobotInfoMapper;
import com.ruoyi.system.service.IOtherRobotAdminService;
import com.ruoyi.system.service.IOtherRobotInfoService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

@Service
@DataSource(value = DataSourceType.SLAVE)
public class OtherRobotAdminServiceImpl extends ServiceImpl<OtherRobotAdminMapper, OtherRobotAdmin> implements IOtherRobotAdminService {

    @Resource
    OtherRobotAdminMapper otherRobotAdminMapper;

    @DataSource(value = DataSourceType.SLAVE)
    public List<OtherRobotAdmin> getOtherRobotAdmin(String command) {
        return otherRobotAdminMapper.selectList(new LambdaQueryWrapper<OtherRobotAdmin>().eq(OtherRobotAdmin::getCommand, command));
    }

}
